package edu.pku.sei.mdabase.infrastructure.graph;

import java.util.HashMap;

import edu.pku.sei.mdabase.infrastructure.Element;



@SuppressWarnings("unchecked")
public class GraphObject<GRAPH extends Graph> extends Element{
	private HashMap<Object,GRAPH> hosts = null;
	
	public GraphObject(){
		super();
	}

	public void setHost(Object key, GRAPH host){
		if(hosts==null){
			hosts = new HashMap<Object,GRAPH>();
		}
		hosts.put(key, host);
	}
	
	public GRAPH getHost(Object key){
		if(hosts==null)
			return null;
		else
			return hosts.get(key);
	}

}
